<%--
  Created by IntelliJ IDEA.
  User: 赵朋立
  Date: 2022/9/21
  Time: 9:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%-- 引入第三方标签库 --%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>成功页面</title>
</head>
<body>
<c:if test="${user != '' }">
    恭喜您,注册成功！！！
    <%--<p>
        <%= request.getAttribute("aa")%>
    </p>
    <p>
        <%= session.getAttribute("bb")%>
    </p>
    <p>
        <%= application.getAttribute("cc")%>
    </p>--%>
    <br/>
    ---------------使用小脚本显示数据-----------------------
    <%
        String user =  (String)request.getAttribute("user");
        String pwd  =   (String)request.getAttribute("pwd");
        String str  =  (String)request.getAttribute("str");
    %>
    <p>
        <%= user%>
    </p>
    <p>
        <%= pwd%>
    </p>
    <p>
        <%= str%>
    </p>
    ---------------使用EL表达式显示数据-----------------------
    <p>
            ${requestScope.user}
    </p>
    <p>
            ${pwd}
    </p>
    <p>
            ${str}
    </p>
</c:if>
<%-- 需求:当用户名为空时，显示集合里面的名字 --%>
<%-- c标签的循环标签 --%>
<c:if test="${user == ''}">
   <c:forEach items="${list}" var="name">
          <p>姓名:${name}</p>
   </c:forEach>
</c:if>
</body>
</html>
